package com.yyt.springbootdemorabbitmq.receiver;

import com.yyt.springbootdemorabbitmq.pojo.User;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author: yeyangtao
 * @date: 2019/12/3 19:48
 */
@Component
@RabbitListener(queues = "object")
public class UserReceiver {
    @RabbitHandler
    public void process(User user){
        System.out.println("接收的对象是："+user);
    }
}
